[BITS 64]
[SECTION .text]

extern kernel64_main
extern ap_run_flow

global _start
_start:
    jmp kernel64_entry

ap_kernel_entry:
    call ap_run_flow
.hlt:
    sti
    hlt
    jmp .hlt

kernel64_entry:
    call kernel64_main
    ; endless loop
    jmp $
